# Maintainer: Matias Korhonen <webadmin@draco-vulgaris.net>
pkgname=s2-liplianin-hg
pkgver=15071
pkgrel=2
pkgdesc="DVB drivers for Linux"
arch=('i686' 'x86_64')
url="http://mercurial.intuxication.org/hg/s2-liplianin"
license=('GPL3')
depends=()
makedepends=('mercurial' 'kernel26-headers')
optdepends=()
provides=('s2-liplianin')
conflicts=('v4l-dvb')
source=()
md5sums=()
install="s2-liplianin-hg.install"
_hgroot="http://mercurial.intuxication.org/hg/"
_hgrepo="s2-liplianin"

build() {
	cd ${srcdir}

	if [ -d ${_hgrepo} ]; then
		cd ${srcdir}/${_hgrepo}
		hg pull -u
	else
		hg clone ${_hgroot}${_hgrepo} || return 1
		cd ${srcdir}/${_hgrepo}
	fi

	msg "Mercurial checkout done or server timeout"
	msg "Starting make... (without the FireDTV modules)"

	cp -R ${srcdir}/${_hgrepo} ${srcdir}/${_hgrepo}-build || return 1
	cd ${srcdir}/${_hgrepo}-build || return 1

	make CONFIG_DVB_FIREDTV:=n || return 1
	make DESTDIR=${pkgdir} install	

	rm -rf ${srcdir}/${_hgrepo}-build
}
